package com.ruoyi.purchase.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.BizPurchaseReceiveMapper;
import com.ruoyi.purchase.domain.BizPurchaseReceive;
import com.ruoyi.purchase.service.IBizPurchaseReceiveService;
import com.ruoyi.common.core.text.Convert;

/**
 * 采购收货记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-16
 */
@Service
public class BizPurchaseReceiveServiceImpl implements IBizPurchaseReceiveService 
{
    @Autowired
    private BizPurchaseReceiveMapper bizPurchaseReceiveMapper;

    /**
     * 查询采购收货记录
     * 
     * @param receiveId 采购收货记录主键
     * @return 采购收货记录
     */
    @Override
    public BizPurchaseReceive selectBizPurchaseReceiveByReceiveId(Long receiveId)
    {
        return bizPurchaseReceiveMapper.selectBizPurchaseReceiveByReceiveId(receiveId);
    }

    /**
     * 查询采购收货记录列表
     * 
     * @param bizPurchaseReceive 采购收货记录
     * @return 采购收货记录
     */
    @Override
    public List<BizPurchaseReceive> selectBizPurchaseReceiveList(BizPurchaseReceive bizPurchaseReceive)
    {
        return bizPurchaseReceiveMapper.selectBizPurchaseReceiveList(bizPurchaseReceive);
    }

    /**
     * 新增采购收货记录
     * 
     * @param bizPurchaseReceive 采购收货记录
     * @return 结果
     */
    @Override
    public int insertBizPurchaseReceive(BizPurchaseReceive bizPurchaseReceive)
    {
        return bizPurchaseReceiveMapper.insertBizPurchaseReceive(bizPurchaseReceive);
    }

    /**
     * 修改采购收货记录
     * 
     * @param bizPurchaseReceive 采购收货记录
     * @return 结果
     */
    @Override
    public int updateBizPurchaseReceive(BizPurchaseReceive bizPurchaseReceive)
    {
        return bizPurchaseReceiveMapper.updateBizPurchaseReceive(bizPurchaseReceive);
    }

    /**
     * 批量删除采购收货记录
     * 
     * @param receiveIds 需要删除的采购收货记录主键
     * @return 结果
     */
    @Override
    public int deleteBizPurchaseReceiveByReceiveIds(String receiveIds)
    {
        return bizPurchaseReceiveMapper.deleteBizPurchaseReceiveByReceiveIds(Convert.toStrArray(receiveIds));
    }

    /**
     * 删除采购收货记录信息
     * 
     * @param receiveId 采购收货记录主键
     * @return 结果
     */
    @Override
    public int deleteBizPurchaseReceiveByReceiveId(Long receiveId)
    {
        return bizPurchaseReceiveMapper.deleteBizPurchaseReceiveByReceiveId(receiveId);
    }
}
